﻿using HotChocolate.Authorization;

namespace HotChocolateDemo.ProductService.Host.GraphTypes;

[ExtendObjectType(typeof(Query))]
public class ProductResolver
{
    public ProductEntity GetProduct() => new ProductEntity
    {
        Title = "This is product service.",
    };

    public string GetCurrentTime() => DateTime.Now.AddHours(1).ToString();
}

public class ProductEntity
{
    public string Title { get; set; } = default!;
}
